package top;

/**
 *
 * 两整数之和
 *
 * @author chenyw
 * @date 2022/7/22 9:25
 */
public class Top371getSum {
    public int getSum(int a, int b) {
        while (b != 0) {
            //这一句写上面， 在a变化之前
            int tmp = (a & b) << 1;
            a = a ^ b;
            b = tmp;
        }
        return a;
    }
}
